package String;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 洪汤泽大帅哥
 * Date: 2024-11-10
 * Time: 11:11
 */
public class demo3 {
    public static void main(String[] args) {
        String str1 = new String("abcd");

        String str2 = new String("zbcd");

        System.out.println(str1 == str2);
        System.out.println(str1.equals(str2));//是否相等
        System.out.println(str1.compareTo(str2));//比较大小
    }
}
